<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改古诗词')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-poem-edit" th:object="${poem}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="mingcheng" th:field="*{mingcheng}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">作者：</label>
                <div class="col-sm-8">
                    <input name="zuozhe" th:field="*{zuozhe}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">原文：</label>
                <div class="col-sm-8">
                    <input name="yuanwen" th:field="*{yuanwen}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">注解：</label>
                <div class="col-sm-8">
                    <input name="zhujie" th:field="*{zhujie}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">译文：</label>
                <div class="col-sm-8">
                    <input name="yiwen" th:field="*{yiwen}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">赏析：</label>
                <div class="col-sm-8">
                    <input name="shangxi" th:field="*{shangxi}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">背景：</label>
                <div class="col-sm-8">
                    <input name="beijing" th:field="*{beijing}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">诗频：</label>
                <div class="col-sm-8">
                    <input name="shipin" th:field="*{shipin}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">题材：</label>
                <div class="col-sm-8">
                    <input name="ticai" th:field="*{ticai}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">朝代：</label>
                <div class="col-sm-8">
                    <input name="chaodai" th:field="*{chaodai}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">国家：</label>
                <div class="col-sm-8">
                    <input name="guojia" th:field="*{guojia}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分类：</label>
                <div class="col-sm-8">
                    <input name="fenlei" th:field="*{fenlei}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">阶段：</label>
                <div class="col-sm-8">
                    <input name="jieduan" th:field="*{jieduan}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课本：</label>
                <div class="col-sm-8">
                    <input name="keben" th:field="*{keben}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">出处：</label>
                <div class="col-sm-8">
                    <input name="chuchu" th:field="*{chuchu}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">丛书：</label>
                <div class="col-sm-8">
                    <input name="congshu" th:field="*{congshu}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">摘要：</label>
                <div class="col-sm-8">
                    <input name="zhaiyao" th:field="*{zhaiyao}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">音频：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('common_support')}">
                        <input type="radio" th:id="${'voice_' + dict.dictCode}" name="voice" th:value="${dict.dictValue}" th:field="*{voice}">
                        <label th:for="${'voice_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址：</label>
                <div class="col-sm-8">
                    <input name="url" th:field="*{url}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">浏览次数：</label>
                <div class="col-sm-8">
                    <input name="viewCount" th:field="*{viewCount}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "poem/poem";
        $("#form-poem-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-poem-edit').serialize());
            }
        }
    </script>
</body>
</html>